<template>
  <div>
    <div class="page-header col-xs-offset-2 col-xs-8">
      <h2>Vue路由测试</h2>
    </div>
    <!-- 导航区域 -->
    <div class="col-xs-2 col-xs-offset-2">
      <!-- 在原始的html中使用a标签进行跳转 -->
      <!-- <a class="list-group-item active" href="./about.html">About</a>
      <a class="list-group-item" href="./home.html">Home</a> -->

      <router-link class="list-group-item " active-class="active" to="/about">About</router-link>
      <router-link class="list-group-item" active-class="active" to="/home">Home</router-link>
    </div>

    <!-- 展示区 -->
    <div class="col-xs-6 ">
      <router-view></router-view>
    </div>

  </div>
</template>


<script>
import About from './pages/About.vue'
import Home from './pages/Home.vue'
// 引入路由视图
import { RouterView, RouterLink } from 'vue-router'
export default {
  name: 'App',
  components: { Home, About },
};
</script>



<!-- 基础样式 -->
<style>
/* .app {
  background-color: #ddd;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px;
} */
</style>